#pragma once
#include "texture.h"
#include "model.h"
#include "shader.h"
#include "vector3.h"

class Object
{
public:
	Vector3 m_position;
	Vector3 m_rotateAngle;
	Vector3 m_scale;
	Vector4 m_color;
	Matrix m_worldMatrix;
	Matrix m_wvpMatrix;
	Texture *m_texture;
	Model *m_model;
	Shader *m_shader;
	char m_id[MAX_10];

public:
	Vector3 m_center;
	float m_radiusX;
	float m_radiusY;
	float m_radiusZ;

public:
	Object(void);
	~Object(void);
	void Init(const char* id, const Vector3 &position, const Vector3 &rotateAngle, const Vector3 &scale, Texture* const &texture, Model* const &model, Shader* const &shader);
	//void Draw();
	void Draw(const Matrix &viewProjectMatrix);
	virtual void Update();
	void SetPosition(Vector3 position);
	void SetRotateAngle(Vector3 rotateAngle);
	void SetScale(Vector3 scale);
	void SetTexture(Texture *texture);
	void SetModel(Model *model);
	void SetShader(Shader *shader);
	void CalWorldMatrix();
	void CalCenter();
	const char* GetID();
};
